﻿@model KRM.Core.tblCompany
@{
    ViewBag.Title = "CompanyDetails";
}

<ul class="tabs tabs-inline tabs-top orderdetail-task-tabs">
            <li class="active">
                <a href="#contactdetails" data-toggle="tab">Contact Details</a>
            </li>
            <li>
                <a href="#companydetails" data-toggle="tab">Company Details</a>
            </li>
            <li>
                <a href="#productrange" data-toggle="tab">Product Range / Price Lists</a>
            </li>
             <li>
                <a href="#note" data-toggle="tab">Notes / Comments</a>
            </li>
</ul>

<div class="tab-content padding tab-content-inline tab-content-bottom orderdetail-task-tabs-content">
    <div class="tab-pane active" id="contactdetails">
        <fieldset>
            <legend>Primary Contact Details</legend>
            <div class="row-fluid">
                <div class="span7">
                    <div class="row-fluid">
                         <div class="span4">Company Name</div>
                         <div class="span8"><input type="text" name="CompanyName" value="@Model.CompanyName" /></div>                   
                    </div>
                    <div class="row-fluid">
                        <div class="span4">Primary Company Contact</div>
                        <div class="span8"><input type="text" name="Contact" value="@Model.Contact" /></div>
                    </div>
                    <div class="row-fluid">
                        <div class="span4">Primary Telephone No.</div>
                        <div class="span8"><input type="text" name="Telephone" value="@Model.Telephone"/></div>
                    </div>
                    <div class="row-fluid">
                        <div class="span4">Secondary Telephone No.</div>
                        <div class="span8"><input type="text" name="Telephone2" value="@Model.Telephone2"/></div>
                    </div>
                    <div class="row-fluid">
                        <div class="span4">Fax No.</div>
                        <div class="span8"><input type="text" name="Fax" value="@Model.Fax"/></div>
                    </div>
                    <div class="row-fluid">
                        <div class="span4">Primary Email</div>
                        <div class="span8"><input type="text" name="Email" value="@Model.Email"/></div>
                    </div>
                    <div class="row-fluid">
                        <div class="span4">Stock Ordering Email</div>
                        <div class="span8"><input type="text" name="StockOrderingEmail" value="@Model.StockOrderingEmail"/></div>
                    </div>
                    <div class="row-fluid">
                        <div class="span4">Tendering Email</div>
                        <div class="span8"><input type="text" name="TenderingEmail" value="@Model.TenderingEmail"/></div>
                    </div>
                    
                </div>
                <div class="span5">
                    <div class="row-fluid">Company Description:</div>
                    <div class="row-fluid"><textarea name="TaskDescription" style="width:95%;" rows="3">@Model.CompanyDescription</textarea></div>
                    <div class="row-fluid">
                        <fieldset>
                            <legend>Address</legend>
                            <div class="row-fluid"><div class="span4">Address Type:</div><div class="span8"><select style="width:100%"></select></div></div>
                            <div class="row-fluid"><textarea name="TaskDescription" style="width:95%;" rows="5"></textarea></div>
                            <div class="row-fluid"><button class="btn btn-primary pull-right">Edit</button></div>
                        </fieldset>
                    </div>
                    <div class="row-fluid">
                        <div class="span4">
                            <label class="checkbox">
                                @if (@Model.Archive == true)
                                { 
                                    <input type="checkbox" name="viewArchive" value="1" checked>
                                }
                                else
                                {
                                    <input type="checkbox"  name="viewArchive" value="1">
                                }
                                Archive 
                            </label>
                         </div>
                        <div class="span8"><button class="btn btn-primary pull-right" style="width:100px;">Save</button></div>
                    </div>
                </div>
            </div>
    
        </fieldset>
        <fieldset>
            <legend>Contacts</legend>
            <div class="row-fluid"><button class="btn btn-primary" style="width:100px;">Add Contacts</button></div>
            <div class="row-fluid">
                    <table class="table table-bordered table-fix krmtable" id="tableCompany" data-height="450">
                    <thead>
                        <tr>
                            <th>FirstName</th>
                            <th>Surname</th>
                            <th>Role</th>
                            <th>TelephoneNumber</th>
                            <th>MobileNumber</th>
                            <th>Email</th>
                            <th></th>
                        </tr>
                    </thead>
                        </table>
            </div>
            
        </fieldset>
        </div>
    <div class="tab-pane" id="companydetails">
        <form id="frmDetails" action="" method="get">
        <div class="row-fluid">
            <div class="span7">
                <div class="row-fluid">
                     <div class="span4">Sage Account</div>
                     <div class="span8"><input type="text" name="SageAccount" value="@ViewBag.SageAccount"/></div>
                </div>
                <div class="row-fluid">
                     <div class="span4">Settlement Discount (%)</div>
                     <div class="span8"><input type="text" name="SettlementDiscount" value="@Model.SettlementDiscount"/></div>
                </div>
                <div class="row-fluid">
                     <div class="span4">Settlement Period (Days)</div>
                     <div class="span8"><input type="text" name="SettlementPeriod" value="@Model.SettlementPeriod"/></div>
                </div>
                <div class="row-fluid">
                     <div class="span4">Monthly Rebate</div>
                     <div class="span8"><input type="text" name="MonthlyRebate" value="@Model.MonthlyRebate"/></div>
                </div>
                <div class="row-fluid">
                     <div class="span4">Settlement Notes</div>
                     <div class="span8"><input type="text" name="SettlementNotes" value="@Model.SettlementNotes"/></div>
                </div>
                <div class="row-fluid">
                     <div class="span4">Company Logo</div>
                     <div class="span8"><input type="text" name="CompanyLogo" value="@Model.CompanyLogo"/></div>
                </div>
                <div class="row-fluid">
                     <div class="span4">Delivery Procedures</div>
                     <div class="span8"><textarea name="DeliveryInformation" rows="3">@Model.DeliveryInformation</textarea></div>
                </div>
                <div class="row-fluid">
                     <div class="span4">Payment Terms</div>
                     <div class="span8">@Html.DropDownList("PaymentTermsID")</div>
                </div>
                <div class="row-fluid">
                     <div class="span4">Payment Terms</div>
                     <div class="span8">@Html.DropDownList("ShippingMethodID")</div>
                </div>
                <div class="row-fluid">
                     <div class="span4">Default Part Lead Time</div>
                     <div class="span8"><input type="text" name="DefaultPartLeadTime" value="@Model.DefaultPartLeadTime"/></div>
                </div>                
            </div>
            <div class="span5">
                <fieldset>
                    <legend>Send Orders By</legend>
                    <div class="row-fluid"><input type="radio" name="rdo" value="Fax" />Fax</div>
                    <div class="row-fluid"><input type="radio" name="rdo" value="Email" checked/>Email</div>
                    <div class="row-fluid">
                        <div class="span6"><input type="radio" name="rdo" value="Spreadsheet" />Spreadsheet</div>
                        <div class="span6"><button class="btn btn-primary">Edit Spreadsheet</button></div>
                    </div>
                </fieldset>
                <fieldset>
                    <legend>Brand</legend>
                    <div class="row-fluid"><label class="checkbox">
                                @if (@ViewBag.HasBrand)
                                { 
                                    <input type="checkbox" name="createBrand" value="1" checked>
                                }
                                else
                                {
                                    <input type="checkbox"  name="createBrand" value="1">
                                }
                                Create As Brand 
                            </label>
                    </div>
                    <div class="row-fluid"><button class="btn btn-primary">Super Branding</button></div>
                </fieldset>
            </div>
        </div>
        <div class="row-fluid">
            <div class="span5">
                <div class="row-fluid">
                        <button class="btn btn-primary pull-right">Set Lead Time To All Parts</button>
                    </div>
            </div>
            <div class="span7">
                <div class="row-fluid">
                        <button class="btn btn-primary pull-right" style="width:100px;">Save</button>
                    </div>
            </div>
        </div>

            </form>
    </div>
    <div class="tab-pane" id="productrange">
        Product Range / Price Lists
    </div>
    <div class="tab-pane" id="note">
        Notes / Comments
    </div>
</div>